#include <tchar.h>
#include <stdio.h>
#include <Windows.h>

void main()
{
	MEMORYSTATUS MemStatus = {sizeof(MemStatus)};

	GlobalMemoryStatus(&MemStatus);
	
	_tprintf(_T("Memory Load:\t\t%d\n")
			 _T("Avail Page File:\t%dKB\n")
			 _T("Total Page File:\t%dKB\n")
			 _T("Avail Virtual File:\t%dKB\n")
			 _T("Total Virtual File:\t%dKB\n")
			 _T("Avail Phys Memory:\t%dKB\n")
			 _T("Avail Total Memory:\t%dKB\n"),
			 MemStatus.dwMemoryLoad,
		     MemStatus.dwAvailPageFile/1024,
			 MemStatus.dwTotalPageFile/1024,
			 MemStatus.dwAvailVirtual/1024,
			 MemStatus.dwTotalVirtual/1024,
			 MemStatus.dwAvailPhys/1024,
			 MemStatus.dwTotalPhys/1024);	
	
	system("pause");

	return;
}